#!/bin/bash

set -x

cd /tmp

rm -rf setuptools*
cp ~/setuptools-0.6c1.zip .
unzip setuptools-0.6c1.zip
cd setuptools-0.6c1
$PYTHON setup.py install
cd ..

#rm -rf ZopeInterface*
#cp ~/ZopeInterface-3.1.0c1.tgz .
#tar xvfz ZopeInterface-3.1.0c1.tgz
#cd ZopeInterface-3.1.0c1
#$PYTHON setup.py install
#cd ..

rm -rf zope.interface*
zope.interface-3.3.0.tar.gz
cp ~/zope.interface-3.3.0.tar.gz .
tar xvfz zope.interface-3.3.0.tar.gz
cd zope.interface-3.3.0
$PYTHON setup.py install
cd ..

rm -rf pycrypto-2.0.1*
cp ~/pycrypto-2.0.1.tar.gz .
tar xvfz pycrypto-2.0.1.tar.gz
cd pycrypto-2.0.1
$PYTHON setup.py install
cd ..

rm -rf pyOpenSSL-0.6*
cp ~/pyOpenSSL-0.6.tar.gz .
tar xvfz pyOpenSSL-0.6.tar.gz
cd pyOpenSSL-0.6
$PYTHON setup.py install
cd ..

rm -rf Twisted
svn co svn://svn.twistedmatrix.com/svn/Twisted/trunk Twisted

# disable tests that fail all the time
#cp -rf ~/doctored_twisted_tests/*py /tmp/Twisted/twisted/test/

cd Twisted/bin
$PYTHON -Wall trial --reporter=bwverbose --random=0 twisted

